package org.springblade.modules.repair.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.tenant.mp.TenantEntity;
import org.springblade.core.tool.utils.DateUtil;

/**
    * 电梯保养计划策略
    */
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "blade_elevator_plan_strategy")
public class ElevatorPlanStrategy extends TenantEntity {
	/**
	 * 电梯id
	 */
	@ApiModelProperty(value = "电梯id")
	private Long elevatorId;
	/**
	 * 是否已做首保 0:否, 1-是
	 */
	@ApiModelProperty(value = "是否已做首保 0:否, 1-是")
	private Integer isFirst;
	/**
	 * 上一次维保工单id
	 */
	@ApiModelProperty(value = "上一次维保工单id")
	private Long previousPlanId;
	/**
	 * 上一次维保签字日期
	 */
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@ApiModelProperty(value = "上一次维保签字日期")
	private Date previousPlanDate;
	/**
	 * 下一次维保工单id
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "下一次维保工单id")
	private Long nextPlanId;
	/**
	 * 下一次保养计划日期
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@ApiModelProperty(value = "下一次保养计划日期")
	private Date nextPlanDate;
	/**
	 * 逾期临界日期
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@ApiModelProperty(value = "逾期临界日期")
	private Date overdueDate;
	/**
	 * 最末保养日期
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@JsonFormat(pattern = DateUtil.PATTERN_DATE)
	@ApiModelProperty(value = "最末保养日期")
	private Date lastDate;

	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "其它剩余计划是否存在逾期 0-否，1-是")
	private Integer otherOverdue;
}
